<?php

include_once("playlistMapper.class.php");

session_set_cookie_params(60*10);
session_name("Music");
session_start();

if (isset($_POST['delete_playlist'])) {
    $playlist = playlistMapper::findByUseridAndName($_SESSION['userid'], $_POST['delete_playlist']);
    $playlistmapper = new playlistMapper();
    unlink($playlist[0]->get_xml());
    $playlistmapper->delete($playlist[0]);
}

?>
